package com.ui.basic.assembler.masterdata;

import java.util.List;

import com.common.basic.base.BaseAssembler;
import com.ui.basic.command.masterdata.CommandCountry;
import com.ui.basic.ibatis.model.masterdata.TblMCountry;

public class CountryAssembler implements
		BaseAssembler<TblMCountry, CommandCountry> {

	public CommandCountry toDto(TblMCountry entity) {
		CommandCountry dto = new CommandCountry();
		dto.setId(entity.getId());
		dto.setCountryCode(entity.getCode());
		dto.setCountryName(entity.getName());
		return dto;
	}

	public List<CommandCountry> toDtoList(List<TblMCountry> listEntity) {

		return null;
	}

	public TblMCountry toEntity(CommandCountry dto) {
		TblMCountry entity = new TblMCountry();
		entity.setId(dto.getId());
		entity.setCode(dto.getCountryCode());
		entity.setName(dto.getCountryName());

		return entity;
	}

}
